Integrand size = 21, antiderivative size = 122 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}-\frac {b^2 \text {arctanh}(\cos (c+d x))}{a^3 d}+\frac {b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \]
-1/2*arctanh(cos(d*x+c))/a/d-b^2*arctanh(cos(d*x+c))/a^3/d+b*csc(d*x+c)/a^ 2/d-1/2*cot(d*x+c)*csc(d*x+c)/a/d+b*arctanh((b*cos(d*x+c)-a*sin(d*x+c))/(a ^2+b^2)^(1/2))*(a^2+b^2)^(1/2)/a^3/d
Time = 1.31 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.47 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {-16 b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )+4 a b \cot \left (\frac {1}{2} (c+d x)\right )-a^2 \csc ^2\left (\frac {1}{2} (c+d x)\right )-4 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-8 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+4 a^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+8 b^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+a^2 \sec ^2\left (\frac {1}{2} (c+d x)\right )+4 a b \tan \left (\frac {1}{2} (c+d x)\right )}{8 a^3 d} \]
(-16*b*Sqrt[a^2 + b^2]*ArcTanh[(-b + a*Tan[(c + d*x)/2])/Sqrt[a^2 + b^2]] + 4*a*b*Cot[(c + d*x)/2] - a^2*Csc[(c + d*x)/2]^2 - 4*a^2*Log[Cos[(c + d*x )/2]] - 8*b^2*Log[Cos[(c + d*x)/2]] + 4*a^2*Log[Sin[(c + d*x)/2]] + 8*b^2* Log[Sin[(c + d*x)/2]] + a^2*Sec[(c + d*x)/2]^2 + 4*a*b*Tan[(c + d*x)/2])/( 8*a^3*d)
Time = 0.56 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4001, 3042, 3589, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x)^3 (a+b \tan (c+d x))}dx\) |
\(\Big \downarrow \) 4001 |
\(\displaystyle \int \frac {\cot (c+d x) \csc ^2(c+d x)}{a \cos (c+d x)+b \sin (c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)}{\sin (c+d x)^3 (a \cos (c+d x)+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3589 |
\(\displaystyle \int \left (-\frac {b^3 \sec ^2(c+d x)}{a^3 (a \cos (c+d x)+b \sin (c+d x))}+\frac {b^2 \csc (c+d x) \sec ^2(c+d x)}{a^3}-\frac {b \csc ^2(c+d x) \sec (c+d x)}{a^2}+\frac {\csc ^3(c+d x)}{a}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {b^2 \text {arctanh}(\cos (c+d x))}{a^3 d}+\frac {b \csc (c+d x)}{a^2 d}+\frac {b \sqrt {a^2+b^2} \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d}\) |
-1/2*ArcTanh[Cos[c + d*x]]/(a*d) - (b^2*ArcTanh[Cos[c + d*x]])/(a^3*d) + ( b*Sqrt[a^2 + b^2]*ArcTanh[(b*Cos[c + d*x] - a*Sin[c + d*x])/Sqrt[a^2 + b^2 ]])/(a^3*d) + (b*Csc[c + d*x])/(a^2*d) - (Cot[c + d*x]*Csc[c + d*x])/(2*a* d)
3.1.58.3.1 Defintions of rubi rules used
Int[(cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.))/(cos[(c_. ) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[Ex pandTrig[cos[c + d*x]^m*(sin[c + d*x]^n/(a*cos[c + d*x] + b*sin[c + d*x])), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IntegersQ[m, n]
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n _.), x_Symbol] :> Int[Sin[e + f*x]^m*((a*Cos[e + f*x] + b*Sin[e + f*x])^n/C os[e + f*x]^n), x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && ILtQ [n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))
Time = 1.51 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.15
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{2}+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a^{2}}-\frac {2 b \sqrt {a^{2}+b^{2}}\, \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{3}}-\frac {1}{8 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {\left (2 a^{2}+4 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3}}+\frac {b}{2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d}\) | \(140\) |
default | \(\frac {\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a}{2}+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a^{2}}-\frac {2 b \sqrt {a^{2}+b^{2}}\, \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a^{3}}-\frac {1}{8 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {\left (2 a^{2}+4 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3}}+\frac {b}{2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d}\) | \(140\) |
risch | \(\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (-i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-i a -2 b \right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) b^{2}}{a^{3} d}-\frac {i \sqrt {-a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {\sqrt {-a^{2}-b^{2}}\, \left (i b +a \right )}{a^{2}+b^{2}}\right )}{d \,a^{3}}+\frac {i \sqrt {-a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {\sqrt {-a^{2}-b^{2}}\, \left (i b +a \right )}{a^{2}+b^{2}}\right )}{d \,a^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) b^{2}}{a^{3} d}\) | \(284\) |
1/d*(1/4/a^2*(1/2*tan(1/2*d*x+1/2*c)^2*a+2*b*tan(1/2*d*x+1/2*c))-2*b*(a^2+ b^2)^(1/2)/a^3*arctanh(1/2*(2*a*tan(1/2*d*x+1/2*c)-2*b)/(a^2+b^2)^(1/2))-1 /8/a/tan(1/2*d*x+1/2*c)^2+1/4/a^3*(2*a^2+4*b^2)*ln(tan(1/2*d*x+1/2*c))+1/2 /a^2*b/tan(1/2*d*x+1/2*c))
Leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (114) = 228\).
Time = 0.31 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.21 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {2 \, a^{2} \cos \left (d x + c\right ) - 4 \, a b \sin \left (d x + c\right ) + 2 \, {\left (b \cos \left (d x + c\right )^{2} - b\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) - {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )}} \]
1/4*(2*a^2*cos(d*x + c) - 4*a*b*sin(d*x + c) + 2*(b*cos(d*x + c)^2 - b)*sq rt(a^2 + b^2)*log((2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 - 2*a^2 - b^2 - 2*sqrt(a^2 + b^2)*(b*cos(d*x + c) - a*sin(d*x + c))) /(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2)) - ( (a^2 + 2*b^2)*cos(d*x + c)^2 - a^2 - 2*b^2)*log(1/2*cos(d*x + c) + 1/2) + ((a^2 + 2*b^2)*cos(d*x + c)^2 - a^2 - 2*b^2)*log(-1/2*cos(d*x + c) + 1/2)) /(a^3*d*cos(d*x + c)^2 - a^3*d)
\[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\int \frac {\csc ^{3}{\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \]
Time = 0.30 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.76 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {\frac {4 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a^{2}} + \frac {4 \, {\left (a^{2} + 2 \, b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {{\left (a - \frac {4 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a^{2} \sin \left (d x + c\right )^{2}} + \frac {8 \, {\left (a^{2} b + b^{3}\right )} \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} a^{3}}}{8 \, d} \]
1/8*((4*b*sin(d*x + c)/(cos(d*x + c) + 1) + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)/a^2 + 4*(a^2 + 2*b^2)*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^3 - (a - 4*b*sin(d*x + c)/(cos(d*x + c) + 1))*(cos(d*x + c) + 1)^2/(a^2*sin(d* x + c)^2) + 8*(a^2*b + b^3)*log((b - a*sin(d*x + c)/(cos(d*x + c) + 1) + s qrt(a^2 + b^2))/(b - a*sin(d*x + c)/(cos(d*x + c) + 1) - sqrt(a^2 + b^2))) /(sqrt(a^2 + b^2)*a^3))/d
Time = 0.50 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.71 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} + \frac {4 \, {\left (a^{2} + 2 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} + \frac {8 \, {\left (a^{2} b + b^{3}\right )} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} a^{3}} - \frac {6 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2}}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
1/8*((a*tan(1/2*d*x + 1/2*c)^2 + 4*b*tan(1/2*d*x + 1/2*c))/a^2 + 4*(a^2 + 2*b^2)*log(abs(tan(1/2*d*x + 1/2*c)))/a^3 + 8*(a^2*b + b^3)*log(abs(2*a*ta n(1/2*d*x + 1/2*c) - 2*b - 2*sqrt(a^2 + b^2))/abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b + 2*sqrt(a^2 + b^2)))/(sqrt(a^2 + b^2)*a^3) - (6*a^2*tan(1/2*d*x + 1/2*c)^2 + 12*b^2*tan(1/2*d*x + 1/2*c)^2 - 4*a*b*tan(1/2*d*x + 1/2*c) + a^ 2)/(a^3*tan(1/2*d*x + 1/2*c)^2))/d
Time = 5.55 (sec) , antiderivative size = 764, normalized size of antiderivative = 6.26 \[ \int \frac {\csc ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {b^2\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,\left (\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}\right )}-\frac {a^2\,\left (\frac {\cos \left (c+d\,x\right )}{2}-\frac {\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4}+\frac {\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )}{4}\right )}{\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}}+\frac {a\,b\,\sin \left (c+d\,x\right )}{\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}}-\frac {b^2\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )}{2\,\left (\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}\right )}+\frac {b\,\mathrm {atan}\left (\frac {a^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,1{}\mathrm {i}+b^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,8{}\mathrm {i}+a\,b^3\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,4{}\mathrm {i}+a^3\,b\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,3{}\mathrm {i}+a^2\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,8{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^5+4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b+5\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b^2+12\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^3+4\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^4+8\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^5}\right )\,\sqrt {a^2+b^2}\,1{}\mathrm {i}}{\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}}-\frac {b\,\cos \left (2\,c+2\,d\,x\right )\,\mathrm {atan}\left (\frac {a^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,1{}\mathrm {i}+b^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,8{}\mathrm {i}+a\,b^3\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,4{}\mathrm {i}+a^3\,b\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,3{}\mathrm {i}+a^2\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}\,8{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^5+4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b+5\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b^2+12\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^3+4\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^4+8\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^5}\right )\,\sqrt {a^2+b^2}\,1{}\mathrm {i}}{\frac {a^3\,d}{2}-\frac {a^3\,d\,\cos \left (2\,c+2\,d\,x\right )}{2}} \]
(b^2*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(2*((a^3*d)/2 - (a^3*d*co s(2*c + 2*d*x))/2)) - (a^2*(cos(c + d*x)/2 - log(sin(c/2 + (d*x)/2)/cos(c/ 2 + (d*x)/2))/4 + (log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*cos(2*c + 2* d*x))/4))/((a^3*d)/2 - (a^3*d*cos(2*c + 2*d*x))/2) + (a*b*sin(c + d*x))/(( a^3*d)/2 - (a^3*d*cos(2*c + 2*d*x))/2) - (b^2*log(sin(c/2 + (d*x)/2)/cos(c /2 + (d*x)/2))*cos(2*c + 2*d*x))/(2*((a^3*d)/2 - (a^3*d*cos(2*c + 2*d*x))/ 2)) + (b*atan((a^4*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*1i + b^4*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*8i + a*b^3*cos(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2 )*4i + a^3*b*cos(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*3i + a^2*b^2*sin(c/2 + ( d*x)/2)*(a^2 + b^2)^(1/2)*8i)/(a^5*cos(c/2 + (d*x)/2) + 8*b^5*sin(c/2 + (d *x)/2) + 4*a*b^4*cos(c/2 + (d*x)/2) + 4*a^4*b*sin(c/2 + (d*x)/2) + 5*a^3*b ^2*cos(c/2 + (d*x)/2) + 12*a^2*b^3*sin(c/2 + (d*x)/2)))*(a^2 + b^2)^(1/2)* 1i)/((a^3*d)/2 - (a^3*d*cos(2*c + 2*d*x))/2) - (b*cos(2*c + 2*d*x)*atan((a ^4*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*1i + b^4*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*8i + a*b^3*cos(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*4i + a^3*b*cos (c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)*3i + a^2*b^2*sin(c/2 + (d*x)/2)*(a^2 + b ^2)^(1/2)*8i)/(a^5*cos(c/2 + (d*x)/2) + 8*b^5*sin(c/2 + (d*x)/2) + 4*a*b^4 *cos(c/2 + (d*x)/2) + 4*a^4*b*sin(c/2 + (d*x)/2) + 5*a^3*b^2*cos(c/2 + (d* x)/2) + 12*a^2*b^3*sin(c/2 + (d*x)/2)))*(a^2 + b^2)^(1/2)*1i)/((a^3*d)/2 - (a^3*d*cos(2*c + 2*d*x))/2)